﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="List.ascx.cs" Inherits="admin_Modules_News_List" %>
<input type="hidden" value="false" id="Duyet" runat="server"/>
<input type="hidden" value="false" id="hidDelete" runat="server" />

<table width="735" cellpadding="0" cellspacing="0">

    <tr>
        <td align="left" valign="bottom" width="555"></td>
        <td align="right" width="60">
                        
                           <a href="<%=Constant.ROOT_PATH %>admin/AddNew.aspx?pro=News"> <img src="<%=Constant.ROOT_PATH %>image/button/themmoi.jpg" border="0"/></a>
                        
                    </td>
                    <td align="right" style="padding-left: 3px;" width="60">
                        <asp:ImageButton runat="server" ID="btnDuyet" 
                            ImageUrl="~/image/button/duyetA.jpg" onclick="btnDuyet_Click" 
                            
                             />
                    </td>
                    <td align="right" style="padding-left: 3px;" width="60">
                        <asp:ImageButton runat="server" ID="btnDelete" 
                            ImageUrl="~/image/button/xoa.jpg" onclick="btnimgDel_Click" 
                             />
                    </td>
    </tr>

    <tr>
        <td colspan="4" align="center">
            <div style="padding: 5px 0px 5px 0px" runat="server" id="MyUpdate">
             <%--   <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                    <ContentTemplate>--%>
                    
                      <asp:GridView ID="grdDs" runat="server" Width="100%" 
                    BorderColor="Transparent" PageSize="25" 
                        AllowPaging="True" AutoGenerateColumns="False" CellPadding="0"  
                            DataKeyNames="idCat" BorderWidth="1px" 
                    onpageindexchanging="grdDs_PageIndexChanging" RowHeaderColumn="website"
                            >
                        
                        <Columns>
                        
                          <asp:TemplateField HeaderText="STT" HeaderStyle-Width="20" HeaderStyle-HorizontalAlign="center"
                            HeaderStyle-BorderColor="Black" HeaderStyle-BorderStyle="Solid" HeaderStyle-BorderWidth="1"
                            ItemStyle-HorizontalAlign="Center" ItemStyle-BorderColor="Black" ItemStyle-BorderStyle="Solid"
                            ItemStyle-BorderWidth="1" FooterStyle-BorderColor="Black" FooterStyle-BorderStyle="Solid"
                            FooterStyle-BorderWidth="1" >
                            <ItemTemplate>
                                <asp:Label runat="server" ID="lblSTT" Text='<%# Container.DataItemIndex + 1%>' />
                            </ItemTemplate>

                      

                              <FooterStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                              <HeaderStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" 
                                  HorizontalAlign="Center" Width="20px" />
                              <ItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" 
                                  HorizontalAlign="Center" />

                      

                        </asp:TemplateField>

                           <asp:TemplateField ItemStyle-CssClass="WordWrapItem" HeaderText="Tiêu đề" ItemStyle-VerticalAlign="Middle"  HeaderStyle-BorderColor="Black" HeaderStyle-BorderStyle="Solid"
                            HeaderStyle-BorderWidth="1" ItemStyle-HorizontalAlign="Left" ItemStyle-BorderColor="Black"
                            ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1" FooterStyle-BorderColor="Black"
                            FooterStyle-BorderStyle="Solid" FooterStyle-BorderWidth="1">
                            <ItemTemplate>                               
                               <span style="font-weight:bold;"><%#Convert.ToString(DataBinder.Eval(Container.DataItem, "Description"))%>                                                                                                       
                               </span>
                               <div id='<%#Eval("idCat") %>'></div>
                            </ItemTemplate>


                               <FooterStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                               <HeaderStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                               <ItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" 
                                   CssClass="WordWrapItem" HorizontalAlign="Left" VerticalAlign="Middle" />


                        </asp:TemplateField>  

                          <asp:TemplateField ItemStyle-CssClass="WordWrapItem" HeaderText="Hiện thị Menu" ItemStyle-VerticalAlign="Middle"  HeaderStyle-BorderColor="Black" HeaderStyle-BorderStyle="Solid"
                            HeaderStyle-BorderWidth="1" ItemStyle-HorizontalAlign="Left" ItemStyle-BorderColor="Black"
                            ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1" FooterStyle-BorderColor="Black"
                            FooterStyle-BorderStyle="Solid" FooterStyle-BorderWidth="1">
                            <ItemTemplate>                               
                              
                                 <asp:CheckBox runat="server"  Checked='<%#Eval("ShowTop")%>' />
                            </ItemTemplate>


                              <FooterStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                              <HeaderStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                              <ItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" 
                                  CssClass="WordWrapItem" HorizontalAlign="Left" VerticalAlign="Middle" />


                        </asp:TemplateField>  

                         <asp:TemplateField HeaderText="Sửa" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="20"
                            FooterStyle-HorizontalAlign="Center" HeaderStyle-BorderColor="Black" HeaderStyle-BorderStyle="Solid"
                            HeaderStyle-BorderWidth="1" ItemStyle-BorderColor="Black" ItemStyle-BorderStyle="Solid"
                            ItemStyle-BorderWidth="1" FooterStyle-BorderColor="Black" FooterStyle-BorderStyle="Solid"
                            FooterStyle-BorderWidth="1">
                            <ItemTemplate>
                            
                                     <a href="<%=Constant.ROOT_PATH %>admin/Edit.aspx?pro=News&id=<%#Eval("idCat") %>"> 
                                     <img src="<%=Constant.ROOT_PATH %>image/edit.gif" border="0"/></a>
                            </ItemTemplate>

                             <FooterStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" 
                                 HorizontalAlign="Center" />
                             <HeaderStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                             <ItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" 
                                 HorizontalAlign="Center" Width="20px" />

                        </asp:TemplateField>

                         <asp:TemplateField HeaderText="Duyệt" ItemStyle-Width="20" HeaderStyle-BorderColor="Black"
                            HeaderStyle-BorderStyle="Solid" HeaderStyle-BorderWidth="1" ItemStyle-HorizontalAlign="Left"
                            ItemStyle-BorderColor="Black" ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1"
                            FooterStyle-BorderColor="Black" FooterStyle-BorderStyle="Solid" FooterStyle-BorderWidth="1">
                            <ItemTemplate>
                            
                                <asp:CheckBox runat="server" ID="chkActive"  Checked='<%# Convert.ToInt32(DataBinder.Eval(Container.DataItem, "isActive"))==1?true:false%>' />
                            </ItemTemplate>

                          
                             <FooterStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                             <HeaderStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                             <ItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" 
                                 HorizontalAlign="Left" Width="20px" />

                          
                        </asp:TemplateField>

                           <asp:TemplateField HeaderText="Xóa" ItemStyle-Width="20" HeaderStyle-BorderColor="Black"
                            HeaderStyle-BorderStyle="Solid" HeaderStyle-BorderWidth="1" ItemStyle-HorizontalAlign="Left"
                            ItemStyle-BorderColor="Black" ItemStyle-BorderStyle="Solid" ItemStyle-BorderWidth="1"
                            FooterStyle-BorderColor="Black" FooterStyle-BorderStyle="Solid" FooterStyle-BorderWidth="1">
                            <ItemTemplate>
                                <asp:CheckBox runat="server" ID="chkDelete" />
                            </ItemTemplate>
                               <FooterStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                               <HeaderStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" />
                               <ItemStyle BorderColor="Black" BorderStyle="Solid" BorderWidth="1px" 
                                   HorizontalAlign="Left" Width="20px" />
                        </asp:TemplateField>

                        </Columns>
                        
                        </asp:GridView>
           <%--             
                    </ContentTemplate>
                </asp:UpdatePanel>--%>
                
            </div>
        </td>
    </tr>
    
</table>

